//
//  FyUILib.h
//  FyUILib
//
//  Created by luoc on 16/2/6.
//  Copyright © 2016年 luoc. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "UIControl.h"
typedef enum
{
    FYEVENT_INITVIEW,
    FYEVENT_TOUCHUPINSIDE,
    FYEVENT_TOUCHDOWN,
    FYEVENT_SW_SELECTED,
    FYEVENT_OP_SELECTED,
    FYEVENT_TB_SELECTED,
    FYEVENT_TX_RETURN,
    FYEVENT_TX_BEGIN,
    FYEVENT_LIST_SCROLLBEGIN,
    FYEVENT_SCROLLDRAGBEGIN,
    FYEVENT_SCROLLDRAGEND,
    FYEVENT_SCROLLWILLBEGINDECELERAT,
    FYEVENT_SCROLLENDDECELERAT,
    FYEVENT_TAP,
    FYEVENT_MBSLIDER_SLIDER,
}FYEVENT;

@protocol UIManagerDelegate<NSObject>
- (BOOL)OnNotify:(id<UIAttribute>)pSender event:(FYEVENT)event param:(void*)param;
@end

@interface UIManager : NSObject
- (id)init;
- (id)initWithUIManagerDelegate:(UIViewController<UIManagerDelegate>*)pController;
- (UIViewController<UIManagerDelegate>*)mainController;
- (void)initJs;
- (void)addJsFile:(const char*)file;
- (UIView*)GetViewOfName:(const char*)name;
- (void)AddFloatObject:(UIView*)view;
- (void)removeFloatObject:(UIView*)view;
- (void)ChangeOptionSelectObject:(COptionUI*)option :(NSString*)groupName;
- (void)AddObject:(const char*)name :(UIView*)view;
- (BOOL)OnNotify:(id<UIAttribute>)pSender event:(FYEVENT)event param:(void *)param;
- (void)setFloatViewNeedDisplay;
- (void)ReloadTextInfo;

+ (NSString*)getTextOfLanguageTag:(NSString*)lgTag;
+ (void)ReloadLoadLanguage:(NSString*)sFile;

@property(nonatomic, assign, setter=SetMainView:) UIView   *mainView;
@end

